import request from '@/utils/request'

export default{
  // 3.根据课程id获取课程基本信息
  getCourseInfoId(courseId) {
    return request({
      url: `/serviceEdu/course/getCourseInfo/${courseId}`,
      method: 'get'
    })
  },
  // 4.修改课程基本信息
  updateCourseInfo(courseInfo) {
    return request({
      url: `/serviceEdu/course/updateCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },

  // 添加课程基本信息
  addCourseInfo(courseInfo) {
    return request({
      url: `/serviceEdu/course/addCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },
  // 查询所有讲师
  getListTeacher() {
    return request({
      url: `/serviceEdu/teacher/findAll`,
      method: 'get'
    })
  },
  // 5.根据课程id查询课程具体信息多表
  getPublishCourseInfo(courseId) {
    return request({
      url: `/serviceEdu/course/getPublishCourseInfo/${courseId}`,
      method: 'get'
    })
  },
  // 修改发布状态
  publishCourse(courseId) {
    return request({
      url: `/serviceEdu/course/publishCourse/${courseId}`,
      method: 'post'
    })
  },
  // 课程列表前端
  getListCourse() {
    return request({
      url: `/serviceEdu/course`,
      method: 'get'

    })
  },
  // 8.根据课程id删除课程
  deleteCourseById(courseId) {
    return request({
      url: `/serviceEdu/course/${courseId}`,
      method: 'delete'
    })
  }

}
